Skip to content

fix(test): update AlpnHttpTest to use available port instead of fixed port 8080 that can be occupied by parallel tests#6824

Merged
joviegas merged 1 commit intomasterfrom
joviegas/alpn_h2_test
Mar 27, 2026
Merged

fix(test): update AlpnHttpTest to use available port instead of fixed port 8080 that can be occupied by parallel tests#6824
joviegas merged 1 commit intomasterfrom
joviegas/alpn_h2_test

Conversation

@joviegas
Copy link
Copy Markdown
Contributor

Motivation and Context

  • AlpnHttpTest test intermittently failed with

java.lang.AssertionError: 

Expecting a throwable with cause being an instance of:
  software.amazon.awssdk.core.exception.SdkClientException
but was an instance of:
  software.amazon.awssdk.services.h2.model.H2Exception: Service returned HTTP status code 500 (Service: H2, Status Code: 500, Request ID: null) (SDK Attempt 

This was because it got connected to port 8080 since parallel test were getting executed

Modifications

  • The fix is to get a unused port at the time of the test and close it immediately and then use that port for testing so that we dont pick up a port which is used by other parallel tests

Testing

  • Ran in loop and it passed

License

  • I confirm that this pull request can be released under the Apache 2 license

… port 8080 that can be occupied by parallel tests
@joviegas joviegas requested a review from a team as a code owner March 26, 2026 23:02
@sonarqubecloud
Copy link
Copy Markdown

@joviegas joviegas added this pull request to the merge queue Mar 27, 2026
Merged via the queue into master with commit f755c3f Mar 27, 2026
39 of 41 checks passed
@github-actions
Copy link
Copy Markdown

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants